home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / awe2-0_1.lha / awe2-0.1 / Src / RCS / LockedFifo.cc,v < prev    next >
Text File  |  1989-02-20  |  2KB  |  132 lines

  1. head     3.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 3.2
  10. date     89.02.20.15.35.42;  author grunwald;  state Exp;
  11. branches ;
  12. next     3.1;
  13.  
  14. 3.1
  15. date     88.12.20.13.48.55;  author grunwald;  state Exp;
  16. branches ;
  17. next     1.2;
  18.  
  19. 1.2
  20. date     88.10.30.13.04.30;  author grunwald;  state Exp;
  21. branches ;
  22. next     1.1;
  23.  
  24. 1.1
  25. date     88.09.18.16.42.25;  author grunwald;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @@
  32.  
  33.  
  34. 3.2
  35. log
  36. @Start using Gnu library heaps for schedulers
  37. @
  38. text
  39. @// This may look like C code, but it is really -*- C++ -*-
  40. // 
  41. // Copyright (C) 1988 University of Illinois, Urbana, Illinois
  42. //
  43. // written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
  44. //
  45. #include "LockedFifo.h"
  46. #include "stream.h"
  47.  
  48. void
  49. LockedFifo::add(AwesimeFifoItem* t)
  50. {
  51.     fifoLock.reserve();
  52.     AwesimeFifo::add(t);
  53.     fifoLock.release();
  54. }
  55.  
  56. bool
  57. LockedFifo::remove(AwesimeFifoItem *t)
  58. {
  59.     fifoLock.reserve();
  60.     bool ok = AwesimeFifo::remove(t);
  61.     fifoLock.release();
  62.     return(ok);
  63. }
  64.  
  65. bool
  66. LockedFifo::removeIfFound(AwesimeFifoItem *t)
  67. {
  68.     fifoLock.reserve();
  69.     bool ok = AwesimeFifo::removeIfFound(t);
  70.     fifoLock.release();
  71.     return(ok);
  72. }
  73.  
  74. bool
  75. LockedFifo::doStart(AwesimeFifoIndex &index, AwesimeFifoItem* item)
  76. {
  77.     fifoLock.reserve();
  78.     return( AwesimeFifo::doStart(index, item) );
  79. }
  80.  
  81. void
  82. LockedFifo::doDone()
  83. {
  84.     fifoLock.release();
  85. }
  86.  
  87. unsigned int
  88. LockedFifo::size()
  89. {
  90.     fifoLock.reserve();
  91.     unsigned int s = AwesimeFifo::size();
  92.     fifoLock.release();
  93.     return(s);
  94. }
  95.  
  96.  
  97. void LockedFifo::classPrintOn(ostream& s)
  98. {
  99.     fifoLock.reserve();
  100.     AwesimeFifo::classPrintOn(s);
  101.     fifoLock.release();
  102. }
  103. @
  104.  
  105.  
  106. 3.1
  107. log
  108. @Steay version
  109. @
  110. text
  111. @d62 1
  112. a62 1
  113.     s << * ((AwesimeFifo *) this) ;
  114. @
  115.  
  116.  
  117. 1.2
  118. log
  119. @*** empty log message ***
  120. @
  121. text
  122. @@
  123.  
  124.  
  125. 1.1
  126. log
  127. @Initial revision
  128. @
  129. text
  130. @d1 6
  131. @
  132.